<template>
  <div align="center">
    <h1>管理人员登录</h1>
    <button @click="btn1">前往进出账表页面</button>
    <button @click="btn2">前往业务员信息表页面</button>
    <button @click="btn3">前往地区信息表页面</button>
    <br><br><br><br>
    <form action="" @submit.prevent="add" v-model="form">
      <p>名 称: <input type="text" v-model="form.username"></p>
      <p>密 码: <input type="password" v-model="form.password"></p>
      <button type="submit">登录</button>
    </form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {}
    }
  },
  methods: {
    add() {
      this.axios.post('loginM/', this.form)
        .then(res => {
          this.$router.push({'path': '/client'})
        })
    },
    btn1() {
      this.$router.push({'path': '/bill'})
    },
    btn2() {
      this.$router.push({'path': '/clerk'})
    },
    btn3() {
      this.$router.push({'path': '/region'})
    },
  }
}
</script>

<style scoped>

</style>
